package cn.tedu._05weibo.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

@Data
public class UserRegDTO {
    /*
    * value : 属性值
    * required : 是否是必须的
    * exanple : 实例参数
    * */
    @NotNull(message = "用户名不能为空值")
//    @NotEmpty(message = "用户名不能为空值或者空字符串")
//    @Size(min = 6,max = 12,message = "用户名必须要在6-12位之间")
//    @NotBlank(message = "用户名不能为空值,或者空字符串或者空白字符")
    @Pattern(regexp = "^(?:(?:[\\u4e00-\\u9fa5]){1,7}|.{1,14})$\n",message = "用户名不能超过7个汉字或者14个字符")
    @ApiModelProperty(value = "用户名",required = true,example = "admin")
    private String username;
    @ApiModelProperty(value = "密码",required = true)
    private String password;
    @ApiModelProperty(value = "昵称",required = true)
    private String nickname;
}